package com.shop.shoporder.service.impl;

import com.shop.shoporder.entity.GoodsCollect;
import com.shop.shoporder.entity.GoodsCollectInfo;
import com.shop.shoporder.mapper.GoodsCollectMapper;
import com.shop.shoporder.service.GoodsCollectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service("goodsCollectService")
public class GoodsCollectServiceImpl implements GoodsCollectService {

    @Autowired
    GoodsCollectMapper goodsCollectMapper;
    @Override
    public int deleteByPrimaryKey(int gcId) {
        return goodsCollectMapper.deleteByPrimaryKey(gcId);
    }

    @Override
    public int insert(GoodsCollect record) {
        return goodsCollectMapper.insert(record);
    }
    @Transactional
    @Override
    public int insertSelective(GoodsCollect record) {
        return goodsCollectMapper.insertSelective(record);
    }

    @Override
    public GoodsCollect selectByPrimaryKey(int gcId) {
        return goodsCollectMapper.selectByPrimaryKey(gcId);
    }

    @Override
    public int updateByPrimaryKeySelective(GoodsCollect record) {
        return goodsCollectMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(GoodsCollect record) {
        return goodsCollectMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<GoodsCollectInfo> selectGoodsCollectList(int userNoId) {
        return goodsCollectMapper.selectGoodsCollectList(userNoId);
    }

    @Override
    public GoodsCollect queryCollectGoodsByUserNoId(GoodsCollect goodsCollect) {
        return goodsCollectMapper.queryCollectGoodsByUserNoId(goodsCollect);
    }
}
